package com.ruoyi.conversation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.conversation.mapper.ConversationMapper;
import com.ruoyi.conversation.domain.Conversation;
import com.ruoyi.conversation.service.IConversationService;

/**
 * 客服对话Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class ConversationServiceImpl implements IConversationService 
{
    @Autowired
    private ConversationMapper conversationMapper;

    /**
     * 查询客服对话
     * 
     * @param conversationId 客服对话主键
     * @return 客服对话
     */
    @Override
    public Conversation selectConversationByConversationId(Long conversationId)
    {
        return conversationMapper.selectConversationByConversationId(conversationId);
    }

    /**
     * 查询客服对话列表
     * 
     * @param conversation 客服对话
     * @return 客服对话
     */
    @Override
    public List<Conversation> selectConversationList(Conversation conversation)
    {
        return conversationMapper.selectConversationList(conversation);
    }

    /**
     * 新增客服对话
     * 
     * @param conversation 客服对话
     * @return 结果
     */
    @Override
    public int insertConversation(Conversation conversation)
    {
        return conversationMapper.insertConversation(conversation);
    }

    /**
     * 修改客服对话
     * 
     * @param conversation 客服对话
     * @return 结果
     */
    @Override
    public int updateConversation(Conversation conversation)
    {
        return conversationMapper.updateConversation(conversation);
    }

    /**
     * 批量删除客服对话
     * 
     * @param conversationIds 需要删除的客服对话主键
     * @return 结果
     */
    @Override
    public int deleteConversationByConversationIds(Long[] conversationIds)
    {
        return conversationMapper.deleteConversationByConversationIds(conversationIds);
    }

    /**
     * 删除客服对话信息
     * 
     * @param conversationId 客服对话主键
     * @return 结果
     */
    @Override
    public int deleteConversationByConversationId(Long conversationId)
    {
        return conversationMapper.deleteConversationByConversationId(conversationId);
    }
}
